|
|
@@ -14,18 +14,18 @@
|
14
|
14
|
ActiveRecord::Schema.define(version: 20150507153436) do
|
15
|
15
|
|
16
|
16
|
create_table "agent_logs", force: :cascade do |t|
|
17
|
|
- t.integer "agent_id", limit: 4, null: false
|
18
|
|
- t.text "message", limit: 16777215, null: false, charset: "utf8mb4", collation: "utf8mb4_bin"
|
19
|
|
- t.integer "level", limit: 4, default: 3, null: false
|
|
17
|
+ t.integer "agent_id", limit: 4, null: false
|
|
18
|
+ t.text "message", limit: 65535, null: false, charset: "utf8mb4", collation: "utf8mb4_bin"
|
|
19
|
+ t.integer "level", limit: 4, default: 3, null: false
|
20
|
20
|
t.integer "inbound_event_id", limit: 4
|
21
|
21
|
t.integer "outbound_event_id", limit: 4
|
22
|
|
- t.datetime "created_at", null: false
|
23
|
|
- t.datetime "updated_at", null: false
|
|
22
|
+ t.datetime "created_at"
|
|
23
|
+ t.datetime "updated_at"
|
24
|
24
|
end
|
25
|
25
|
|
26
|
26
|
create_table "agents", force: :cascade do |t|
|
27
|
27
|
t.integer "user_id", limit: 4
|
28
|
|
- t.text "options", limit: 16777215, charset: "utf8mb4", collation: "utf8mb4_bin"
|
|
28
|
+ t.text "options", limit: 65535, charset: "utf8mb4", collation: "utf8mb4_bin"
|
29
|
29
|
t.string "type", limit: 255, collation: "utf8_bin"
|
30
|
30
|
t.string "name", limit: 255, charset: "utf8mb4", collation: "utf8mb4_bin"
|
31
|
31
|
t.string "schedule", limit: 255, collation: "utf8_bin"
|
|
|
@@ -33,13 +33,13 @@ ActiveRecord::Schema.define(version: 20150507153436) do
|
33
|
33
|
t.datetime "last_check_at"
|
34
|
34
|
t.datetime "last_receive_at"
|
35
|
35
|
t.integer "last_checked_event_id", limit: 4
|
36
|
|
- t.datetime "created_at", null: false
|
37
|
|
- t.datetime "updated_at", null: false
|
|
36
|
+ t.datetime "created_at"
|
|
37
|
+ t.datetime "updated_at"
|
38
|
38
|
t.text "memory", limit: 4294967295, charset: "utf8mb4", collation: "utf8mb4_bin"
|
39
|
39
|
t.datetime "last_web_request_at"
|
|
40
|
+ t.integer "keep_events_for", limit: 4, default: 0, null: false
|
40
|
41
|
t.datetime "last_event_at"
|
41
|
42
|
t.datetime "last_error_log_at"
|
42
|
|
- t.integer "keep_events_for", limit: 4, default: 0, null: false
|
43
|
43
|
t.boolean "propagate_immediately", limit: 1, default: false, null: false
|
44
|
44
|
t.boolean "disabled", limit: 1, default: false, null: false
|
45
|
45
|
t.string "guid", limit: 255, null: false, charset: "ascii", collation: "ascii_bin"
|
|
|
@@ -51,14 +51,6 @@ ActiveRecord::Schema.define(version: 20150507153436) do
|
51
|
51
|
add_index "agents", ["type"], name: "index_agents_on_type", using: :btree
|
52
|
52
|
add_index "agents", ["user_id", "created_at"], name: "index_agents_on_user_id_and_created_at", using: :btree
|
53
|
53
|
|
54
|
|
- create_table "contacts", force: :cascade do |t|
|
55
|
|
- t.text "message", limit: 65535, charset: "utf8mb4", collation: "utf8mb4_bin"
|
56
|
|
- t.string "name", limit: 255, charset: "utf8mb4", collation: "utf8mb4_bin"
|
57
|
|
- t.string "email", limit: 255, collation: "utf8_bin"
|
58
|
|
- t.datetime "created_at", null: false
|
59
|
|
- t.datetime "updated_at", null: false
|
60
|
|
- end
|
61
|
|
-
|
62
|
54
|
create_table "control_links", force: :cascade do |t|
|
63
|
55
|
t.integer "controller_id", limit: 4, null: false
|
64
|
56
|
t.integer "control_target_id", limit: 4, null: false
|
|
|
@@ -72,15 +64,15 @@ ActiveRecord::Schema.define(version: 20150507153436) do
|
72
|
64
|
create_table "delayed_jobs", force: :cascade do |t|
|
73
|
65
|
t.integer "priority", limit: 4, default: 0
|
74
|
66
|
t.integer "attempts", limit: 4, default: 0
|
75
|
|
- t.text "handler", limit: 16777215, charset: "utf8mb4", collation: "utf8mb4_bin"
|
76
|
|
- t.text "last_error", limit: 16777215, charset: "utf8mb4", collation: "utf8mb4_bin"
|
|
67
|
+ t.text "handler", limit: 16777215, charset: "utf8mb4", collation: "utf8mb4_bin"
|
|
68
|
+ t.text "last_error", limit: 65535, charset: "utf8mb4", collation: "utf8mb4_bin"
|
77
|
69
|
t.datetime "run_at"
|
78
|
70
|
t.datetime "locked_at"
|
79
|
71
|
t.datetime "failed_at"
|
80
|
72
|
t.string "locked_by", limit: 255
|
81
|
73
|
t.string "queue", limit: 255
|
82
|
|
- t.datetime "created_at", null: false
|
83
|
|
- t.datetime "updated_at", null: false
|
|
74
|
+ t.datetime "created_at"
|
|
75
|
+ t.datetime "updated_at"
|
84
|
76
|
end
|
85
|
77
|
|
86
|
78
|
add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree
|
|
|
@@ -88,11 +80,11 @@ ActiveRecord::Schema.define(version: 20150507153436) do
|
88
|
80
|
create_table "events", force: :cascade do |t|
|
89
|
81
|
t.integer "user_id", limit: 4
|
90
|
82
|
t.integer "agent_id", limit: 4
|
91
|
|
- t.decimal "lat", precision: 15, scale: 10
|
92
|
|
- t.decimal "lng", precision: 15, scale: 10
|
93
|
|
- t.text "payload", limit: 4294967295, charset: "utf8mb4", collation: "utf8mb4_bin"
|
94
|
|
- t.datetime "created_at", null: false
|
95
|
|
- t.datetime "updated_at", null: false
|
|
83
|
+ t.decimal "lat", precision: 15, scale: 10
|
|
84
|
+ t.decimal "lng", precision: 15, scale: 10
|
|
85
|
+ t.text "payload", limit: 16777215, charset: "utf8mb4", collation: "utf8mb4_bin"
|
|
86
|
+ t.datetime "created_at"
|
|
87
|
+ t.datetime "updated_at"
|
96
|
88
|
t.datetime "expires_at"
|
97
|
89
|
end
|
98
|
90
|
|
|
|
@@ -103,27 +95,14 @@ ActiveRecord::Schema.define(version: 20150507153436) do
|
103
|
95
|
create_table "links", force: :cascade do |t|
|
104
|
96
|
t.integer "source_id", limit: 4
|
105
|
97
|
t.integer "receiver_id", limit: 4
|
106
|
|
- t.datetime "created_at", null: false
|
107
|
|
- t.datetime "updated_at", null: false
|
|
98
|
+ t.datetime "created_at"
|
|
99
|
+ t.datetime "updated_at"
|
108
|
100
|
t.integer "event_id_at_creation", limit: 4, default: 0, null: false
|
109
|
101
|
end
|
110
|
102
|
|
111
|
103
|
add_index "links", ["receiver_id", "source_id"], name: "index_links_on_receiver_id_and_source_id", using: :btree
|
112
|
104
|
add_index "links", ["source_id", "receiver_id"], name: "index_links_on_source_id_and_receiver_id", using: :btree
|
113
|
105
|
|
114
|
|
- create_table "rails_admin_histories", force: :cascade do |t|
|
115
|
|
- t.text "message", limit: 65535, charset: "latin1", collation: "latin1_swedish_ci"
|
116
|
|
- t.string "username", limit: 255, charset: "latin1", collation: "latin1_swedish_ci"
|
117
|
|
- t.integer "item", limit: 4
|
118
|
|
- t.string "table", limit: 255, charset: "latin1", collation: "latin1_swedish_ci"
|
119
|
|
- t.integer "month", limit: 2
|
120
|
|
- t.integer "year", limit: 8
|
121
|
|
- t.datetime "created_at", null: false
|
122
|
|
- t.datetime "updated_at", null: false
|
123
|
|
- end
|
124
|
|
-
|
125
|
|
- add_index "rails_admin_histories", ["item", "table", "month", "year"], name: "index_rails_admin_histories", using: :btree
|
126
|
|
-
|
127
|
106
|
create_table "scenario_memberships", force: :cascade do |t|
|
128
|
107
|
t.integer "agent_id", limit: 4, null: false
|
129
|
108
|
t.integer "scenario_id", limit: 4, null: false
|
|
|
@@ -151,46 +130,29 @@ ActiveRecord::Schema.define(version: 20150507153436) do
|
151
|
130
|
|
152
|
131
|
create_table "services", force: :cascade do |t|
|
153
|
132
|
t.integer "user_id", limit: 4, null: false
|
154
|
|
- t.string "provider", limit: 255, null: false, charset: "latin1", collation: "latin1_swedish_ci"
|
155
|
|
- t.string "name", limit: 255, null: false, charset: "latin1", collation: "latin1_swedish_ci"
|
156
|
|
- t.text "token", limit: 65535, null: false, charset: "latin1", collation: "latin1_swedish_ci"
|
157
|
|
- t.text "secret", limit: 65535, charset: "latin1", collation: "latin1_swedish_ci"
|
158
|
|
- t.text "refresh_token", limit: 65535, charset: "latin1", collation: "latin1_swedish_ci"
|
|
133
|
+ t.string "provider", limit: 255, null: false, collation: "utf8_general_ci"
|
|
134
|
+ t.string "name", limit: 255, null: false, collation: "utf8_general_ci"
|
|
135
|
+ t.text "token", limit: 65535, null: false, collation: "utf8_general_ci"
|
|
136
|
+ t.text "secret", limit: 65535, collation: "utf8_general_ci"
|
|
137
|
+ t.text "refresh_token", limit: 65535, collation: "utf8_general_ci"
|
159
|
138
|
t.datetime "expires_at"
|
160
|
139
|
t.boolean "global", limit: 1, default: false
|
161
|
|
- t.text "options", limit: 65535, charset: "latin1", collation: "latin1_swedish_ci"
|
|
140
|
+ t.text "options", limit: 65535, collation: "utf8_general_ci"
|
162
|
141
|
t.datetime "created_at"
|
163
|
142
|
t.datetime "updated_at"
|
164
|
|
- t.string "uid", limit: 255, charset: "latin1", collation: "latin1_swedish_ci"
|
|
143
|
+ t.string "uid", limit: 255, collation: "utf8_general_ci"
|
165
|
144
|
end
|
166
|
145
|
|
167
|
146
|
add_index "services", ["provider"], name: "index_services_on_provider", using: :btree
|
168
|
147
|
add_index "services", ["uid"], name: "index_services_on_uid", using: :btree
|
169
|
148
|
add_index "services", ["user_id", "global"], name: "index_services_on_user_id_and_global", using: :btree
|
170
|
149
|
|
171
|
|
- create_table "taggings", force: :cascade do |t|
|
172
|
|
- t.integer "tag_id", limit: 4
|
173
|
|
- t.integer "taggable_id", limit: 4
|
174
|
|
- t.string "taggable_type", limit: 255, collation: "utf8_general_ci"
|
175
|
|
- t.integer "tagger_id", limit: 4
|
176
|
|
- t.string "tagger_type", limit: 255, collation: "utf8_general_ci"
|
177
|
|
- t.string "context", limit: 128, collation: "utf8_general_ci"
|
178
|
|
- t.datetime "created_at"
|
179
|
|
- end
|
180
|
|
-
|
181
|
|
- add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id", using: :btree
|
182
|
|
- add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree
|
183
|
|
-
|
184
|
|
- create_table "tags", force: :cascade do |t|
|
185
|
|
- t.string "name", limit: 255, collation: "utf8_general_ci"
|
186
|
|
- end
|
187
|
|
-
|
188
|
150
|
create_table "user_credentials", force: :cascade do |t|
|
189
|
151
|
t.integer "user_id", limit: 4, null: false
|
190
|
152
|
t.string "credential_name", limit: 255, null: false
|
191
|
153
|
t.text "credential_value", limit: 65535, null: false
|
192
|
|
- t.datetime "created_at", null: false
|
193
|
|
- t.datetime "updated_at", null: false
|
|
154
|
+ t.datetime "created_at"
|
|
155
|
+ t.datetime "updated_at"
|
194
|
156
|
t.string "mode", limit: 255, default: "text", null: false, collation: "utf8_bin"
|
195
|
157
|
end
|
196
|
158
|
|
|
|
@@ -207,8 +169,8 @@ ActiveRecord::Schema.define(version: 20150507153436) do
|
207
|
169
|
t.datetime "last_sign_in_at"
|
208
|
170
|
t.string "current_sign_in_ip", limit: 255
|
209
|
171
|
t.string "last_sign_in_ip", limit: 255
|
210
|
|
- t.datetime "created_at", null: false
|
211
|
|
- t.datetime "updated_at", null: false
|
|
172
|
+ t.datetime "created_at"
|
|
173
|
+ t.datetime "updated_at"
|
212
|
174
|
t.boolean "admin", limit: 1, default: false, null: false
|
213
|
175
|
t.integer "failed_attempts", limit: 4, default: 0
|
214
|
176
|
t.string "unlock_token", limit: 255
|